package com.gc.server.service;

import com.gc.server.entity.GoodsApplyEntity;
import com.gc.server.vo.GoodsApplyVo;
import com.yf.service.BaseService;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 物料申请Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Tue Mar 10 11:17:45 CST 2020
 */
public interface GoodsApplyService extends BaseService<GoodsApplyEntity> {


    List<GoodsApplyVo> queryListVo(GoodsApplyVo goodsApplyVo);

    GoodsApplyVo getVo(Long id);


    /***********BACK***********/

    /***********API***********/


    GoodsApplyEntity apply(Long userId, Long[] ids, Integer[] nums, String remark,String address,String unit);

    List<GoodsApplyVo> findByUserId(Long userId,Date startDate,Date endDate);

    List<GoodsApplyVo> findByPid(Long userId,Date startDate,Date endDate);

    BigDecimal sumAmount(@Param("date") Date date, @Param("userId") Long userId);

    BigDecimal sumAmountByPid(@Param("date") Date date, @Param("userId") Long userId);

    Integer sumCheck(Long userId);

    GoodsApplyEntity check(Long userId, Long id, Integer status, String remark);

    void downLoad(HttpServletResponse response, List<GoodsApplyVo> list);
}
